<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<base href="<%=basePath+"admin" %>"/>
	<link  rel="stylesheet" type="text/css" href="assets/plugins/bootstrap/css/bootstrap.css"/>
	<script type="text/javascript" src="assets/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="assets/plugins/bootstrap/js/bootstrap.js"></script>
	<link rel="stylesheet" href="assets/plugins/kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="assets/plugins/kindeditor/plugins/code/prettify.css" />
	<script charset="utf-8" src="assets/plugins/kindeditor/kindeditor.js"></script>
	<script charset="utf-8" src="assets/plugins/kindeditor/lang/zh_CN.js"></script>
	<script charset="utf-8" src="assets/plugins/kindeditor/plugins/code/prettify.js"></script>
	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="news.content"]', {
				cssPath : 'assets/plugins/kindeditor/plugins/code/prettify.css',
				uploadJson : 'assets/plugins/kindeditor/jsp/upload_json.jsp',
				fileManagerJson : 'assets/plugins/kindeditor/jsp/file_manager_json.jsp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
	<style type="text/css">
		#editpanel form  input[type='text']{
			width:250px;
			height:40px;
			font-size:15px;
			margin-left:3em;
			margin-bottom:1em;
		}
		#editpanel form  input[type='submit']{
			display:block;
			width:100px;
			height:35px;
			border:none;
			background:#565656;
			float:left;
			
			margin-left:210px;
		}
		#editpanel form  input[type='submit']:hover{
			border:1 solid white;
			background:#345563;
		}
		#editpanel form textarea {
			width:700px;
			height:300px;
			visibility:hidden;
		}
		#mainbox{
			width:1000px;
			margin:10px auto 0 auto;
		}
		#header{
			
		}
		#headlogo{
			height:100px;
			background:#686868;
			
			color:white;
		}
		#footer{
			width:100%;
			background:#222222;
			color:white;
			font-size:11px;
			margin-top:1em;
			float:left;			
		}
		#footer p{
			text-align:center;
			margin:auto;
		} 
		#content {
			margin-bottom:80px;
		}
	
	</style>
</head>
<body>
	
		<div id="mainbox">
			<div id="header">
				<jsp:include page="../../Template/admin_top.jsp"/>
			</div>
			<div id="content" class="well">
				<div id="editpanel">
				<form name="example" method="post" action="admin/news_addNews">
					<input  type="text" name="news.title" placeholder="标题"/>
					<textarea name="news.content" cols="100" rows="8" >
					
					</textarea>
					<br />
					<input  type="text" name="news.author" placeholder="作者"/>
					<input  type="text" name="news.source" placeholder="来源"/>
					<br/>
					<s:token></s:token>
					<input type="submit" name="button" value="提交内容" />
				</form>
				</div>
			</div>
			<div id="footer">
   			<p>java 分享平台技术中心</p>
	    	<p>© Cuit software 2012 </p>
  			</div>   
		</div>
		
</body>
</html>